package com.zpp.common.core.enums;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * 状态码与对应信息枚举类
 */

@AllArgsConstructor
@Getter
public enum ResultCode {

    //操作成功
    SUCCESS               (1000, "操作成功"),

    //服务器内部错误，友好提示
    ERROR                 (2000, "服务繁忙请稍后重试"),

    //操作失败，但是服务器不存在异
    FAILED                (3000, "操作失败"),
    FAILED_UNAUTHORIZED   (3001, "未授权"),
    FAILED_PARAMS_VALIDATE(3002, "参数校验失败"),
    FAILED_NOT_EXISTS     (3003, "资源不存在"),
    FAILED_ALREADY_EXISTS (3004, "资源已存在"),

    AILED_USER_EXISTS     (3101, "用户已存在"),
    FAILED_USER_NOT_EXISTS(3102, "用户不存在"),
    FAILED_LOGIN          (3103, "账号或密码错误"),

    FAILED_USER_BANNED    (3104, "您已被列⼊⿊名单, 请联系管理员."),

    FAILED_USER_EMAIL      (3105,"用户邮箱格式错误"),

    FAILED_SEND_EMAIL      (3106,"验证码发送失败"),

    FAILED_FREQUENT     (3107,"操作太频繁，请稍后重试"),

    FAILED_COUNT_LIMIT     (3108,"当天获取验证码次数已达到上限"),

    FAILED_INVALID_CODE     (3109,"失效验证码"),

    FAILED_ERROR_CODE     (3110,"错误验证码"),

    EXAM_START_TIME_BEFORE_CURRENT_TIME(3201, "不允许设置的开始时间比当前时间早"),

    EXAM_START_TIME_AFTER_END_TIME(3202, "不允许设置的开始时间比结束时间晚"),

    EXAM_NOT_EXISTS               (3203, "竞赛不存在"),

    EXAM_QUESTION_NOT_EXISTS      (3204, "当前竞赛新增的题目不存在"),

    EXAM_STARTED                  (3205, "当前竞赛已经开赛，无法操作"),

    EXAM_NOT_HAS_QUESTION         (3206, "目前竞赛还没有题目，无法操作"),

    EXAM_IS_FINISH                 (3207, "目前竞赛已经结束，无法操作"),

    EXAM_IS_PUBLISH               (3208, "竞赛已经发布不能进行编辑，删除操作"),

    USER_EXAM_HAS_ENTER            (3301, "当前竞赛已报名"),

    USER_STATUS_NOT_EXISTS         (3302, "用户状态不存在"),

    FAILED_FILE_UPLOAD              (3401, "文件上传失败"),

    FAILED_FILE_UPLOAD_TIME_LIMIT   (3402,"当天上传头像的次数已达到上限");


    private int code;   //状态码

    private String msg; //状态描述信息
}
